package org.example;

import org.example.domain.Dog;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Hello world!
 */
public class App {
    public static void main(String[] args) {
        System.out.println("Hello World!");
        ClassPathXmlApplicationContext context =
                new ClassPathXmlApplicationContext("beans.xml");
        Dog obj = (Dog)context.getBean("dog");
        System.out.println(obj.toString());
        Dog obj2 = (Dog) context.getBean("dog");
        System.out.println(obj2);
        System.out.println(obj==obj2);

    }
}
